<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-查看活动">
</@frame.head>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 商品管理 <span class="c-gray en">&gt;</span> <#if isAudit>审核<#else>查看</#if>活动 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
   <div class="text-c">
    <table class="table">
      <tr>
        <td width="80px;"><font color="red">*</font>活动名称：</td>
        <td>${productSaleActive.name}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;"><font color="red">*</font>开始时间：</td>
        <td>${(productSaleActive.startDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;"><font color="red">*</font>结束时间：</td>
        <td>${(productSaleActive.endDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;"><font color="red">*</font>折扣：</td>
        <td>${(productSaleActive.sale?string("0.##"))!}</td>
        <td></td>
      </tr>
      <#if productSaleActive.activeType == 1>
      <tr>
        <td width="80px;"><font color="red">*</font>活动简介：</td>
        <td>${productSaleActive.dec}</td>
        <td></td>
      </tr>
      </#if>
      <tr>
       <td colspan="3"><div id="product_id">您已选择${productSaleActive.proIds?split(",")?size-1}款商品</div></td>
      </tr>
      <tr>
            <td colspan="3">
               <div  class="text-c">
               <table id="productTable" class="table table-border table-bordered table-bg">
                     <thead> 
                     <tr>
                        <th >商品编号</th>
                        <th >商品名称</th>
                        <th >商品分类</th>
                        <th >供应商</th>
                        <th >商品品牌</th>
                        <th >库存</th>
                        <#if productSaleActive.activeType == 2>
						<th >商品原价</th>
						</#if>
                        <th >商品价格</th>
                     </tr>
                     </thead>
                     <tbody>
                     <#if proList??>
                       <#list proList as product>
                          <tr>
                             <td>${product.id}</td>
                             <td>${product.baseInfo.name}</td>
                             <td>
                             <#if product.productProperty??>
                                <#if product.productProperty.prodTypeFour??>
						     	 	${product.productProperty.prodTypeFour.name}
                                <#elseif product.productProperty.prodTypeThree??>
						     	 	${product.productProperty.prodTypeThree.name}
                                <#elseif product.productProperty.prodTypeTwo??>
						     	 	${product.productProperty.prodTypeTwo.name}
                                <#elseif product.productProperty.prodTypeOne??>
						     	 	${product.productProperty.prodTypeOne.name}
                                </#if>
                             </#if>
                             </td>
                             <td>${product.merchant.mercName}</td>
                             <td>${brandMap['${product.brandId}']}</td>
                             <td>${product.storeInfo.storeNum}</td>
                             <td>${product.priceInfo.payOneMileage}公里</td>
                             <#if productSaleActive.activeType == 2>
							 <td>${product.priceInfo.payCostMileage}公里</td>
							 </#if>
                          </tr>
                       </#list>
                     </#if>
                     </tbody>
               </table>
               </div>
           </td>
      </tr>
      <tr>
        <td width="80px;">审核记录：</td>
        <td></td>
        <td></td>
      </tr>
      </table>
      <table class="table table-border table-bordered table-bg">
         <thead>
            <tr>
               <th>审核结果</th>
               <th>审核说明</th>
               <th>审核人</th>
               <th>审核时间</th>
            </tr>
         </thead>
      <#if productSaleActive.auditLog?? && (productSaleActive.auditLogList?size &gt; 0)>
        <#list productSaleActive.auditLogList as auditLog>
            <tr>
                <td>
                  <#if auditLog.result == 2><span class="label label-success radius">审核通过</span>
                  <#elseif auditLog.result == 3><span class="label radius">审核驳回</span>
                  </#if>
                </td>
                <td>${auditLog.remark} </td>
                <td>${auditLog.userName}</td>
                <td>${auditLog.auditDate?string("yyyy-MM-dd HH:mm:ss")}</td>
            </tr>
        </#list>
      <#else>
        <tr><td colspan="4" align="center">暂无审核记录</td></tr>
      </#if>
    </table>
    <br>
      <table>
      <#if isAudit==true>
      <form method="post" name="audit_form"  id="audit_form" >
         <input type="hidden" name="id" id="productSaleActiveid" value="${(productSaleActive.id?c)!}"  />                        
      <tr>
          <td width="80px"><font style="color:red;">*</font>审核意见：</td> 
          <td width="400px">
            <textarea class="textarea" placeholder="审核意见" id="remark" name="remark" maxlength="90"></textarea>
          </td><td></td>
      </tr>
      <tr>
          <td></td>
          <td><input type="button" value="审核通过" class="btn btn-success radius"  onclick="auditSuccess();"/>
		   &nbsp;&nbsp;&nbsp;
		  <input type="button" value="审核驳回" class="btn btn-warning radius" onclick="auditFail();"/>
		  &nbsp;&nbsp;&nbsp;
		  <button type="button" class="btn btn-secondary radius" onclick="cancle();">关闭页面</button>
		  </td>
          <td></td>
      </tr> 
      </form>
      <#else>
      <tr>
        <td colspan="2" style="text-align:center;">
        <button type="button" class="btn btn-secondary radius" onclick="cancle();">关闭页面</button>
        </td>      
        <td></td>  
      </tr>          
      </#if>
    </table>
    </div> 
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/activity/activity_look_or_audit.js"></script>
<script type="text/javascript">
var path="${contextPath}";
</script>